package com.aia.ann.web;

import java.util.List;

import org.apache.log4j.Logger;

import com.aia.ann.service.ChiefService;
import com.aia.ilp.service.MainService;
import com.aia.ilp.webinterface.LatestCusts;
import com.aia.ilp.webinterface.Pageable;
import com.cfh.web.PageBean;
import com.opensymphony.xwork2.ActionSupport;

public class MomentListAction extends ActionSupport implements Pageable, LatestCusts {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(MomentListAction.class);

	private static final long serialVersionUID = 1L;
	private List latestCusts;
	private ChiefService chiefService;

	private PageBean pageBean = new PageBean();
	private String search;

	private int page = 1;
	private int pageSize = 6;
	/***
	 * nouse
	 */
	public String execute() {
		if (logger.isDebugEnabled()) {
			logger.debug("execute() - start"); //$NON-NLS-1$
		}
		chiefService.selectLatestAgents(this);

		if (logger.isDebugEnabled()) {
			logger.debug("execute() - end"); //$NON-NLS-1$
		}
		return SUCCESS;
	}


	public void setLatestCusts(List latestCusts) {
		this.latestCusts = latestCusts;
	}

	public List getLatestCusts() {
		return latestCusts;
	}

	public void setPageBean(PageBean pageBean) {
		this.pageBean = pageBean;
	}

	public PageBean getPageBean() {
		return pageBean;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPage() {
		return page;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setSearch(String search) {
		this.search = search;
	}

	public String getSearch() {
		return search;
	}

	public void setChiefService(ChiefService chiefService) {
		this.chiefService = chiefService;
	}

	public ChiefService getChiefService() {
		return chiefService;
	}

}
